// part1:C11:ex11.23.cpp
// use vector rewrite map.
#include <iostream>
#include <map>
#include <string>
#include <algorithm>
using namespace std;

void add_child(multimap<string, string> &families, const string
    &family, const string &child) {
  families.insert({family, child});
}

int main(int argc, char *argv[])
{
  multimap<string, string> families;

  add_child(families, "Zhang", "qiang");
  add_child(families, "Zhang", "xiu");
  add_child(families, "Wang", "mi");

  for (auto f : families) {
    cout << f.first << " child is : " << f.second << endl; 
  }

  return 0;
}
